3.1.68 \(\int \sqrt {4-12 x+9 x^2} \, dx\) [68]

Optimal. Leaf size=23 \[ -\frac {1}{6} (2-3 x) \sqrt {4-12 x+9 x^2} \]

[Out]

-1/6*(2-3*x)*((-2+3*x)^2)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.00, antiderivative size = 23, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {623} \begin {gather*} -\frac {1}{6} (2-3 x) \sqrt {9 x^2-12 x+4} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sqrt[4 - 12*x + 9*x^2],x]

[Out]

-1/6*((2 - 3*x)*Sqrt[4 - 12*x + 9*x^2])

Rule 623

Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(b + 2*c*x)*((a + b*x + c*x^2)^p/(2*c*(2*p + 1)
)), x] /; FreeQ[{a, b, c, p}, x] && EqQ[b^2 - 4*a*c, 0] && NeQ[p, -2^(-1)]

Rubi steps

\begin {align*} \int \sqrt {4-12 x+9 x^2} \, dx &=-\frac {1}{6} (2-3 x) \sqrt {4-12 x+9 x^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 25, normalized size = 1.09 \begin {gather*} \frac {\sqrt {(2-3 x)^2} x (-4+3 x)}{-4+6 x} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[4 - 12*x + 9*x^2],x]

[Out]

(Sqrt[(2 - 3*x)^2]*x*(-4 + 3*x))/(-4 + 6*x)

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 2.
time = 0.07, size = 16, normalized size = 0.70

method result size
default \(\frac {\mathrm {csgn}\left (-2+3 x \right ) \left (-2+3 x \right )^{2}}{6}\) \(16\)
gosper \(\frac {x \left (3 x -4\right ) \sqrt {\left (-2+3 x \right )^{2}}}{-4+6 x}\) \(25\)
risch \(\frac {3 \sqrt {\left (-2+3 x \right )^{2}}\, x^{2}}{2 \left (-2+3 x \right )}-\frac {2 \sqrt {\left (-2+3 x \right )^{2}}\, x}{-2+3 x}\) \(42\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-2+3*x)^2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/6*csgn(-2+3*x)*(-2+3*x)^2

________________________________________________________________________________________

Maxima [A]
time = 0.51, size = 30, normalized size = 1.30 \begin {gather*} \frac {1}{2} \, \sqrt {9 \, x^{2} - 12 \, x + 4} x - \frac {1}{3} \, \sqrt {9 \, x^{2} - 12 \, x + 4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2+3*x)^2)^(1/2),x, algorithm="maxima")

[Out]

1/2*sqrt(9*x^2 - 12*x + 4)*x - 1/3*sqrt(9*x^2 - 12*x + 4)

________________________________________________________________________________________

Fricas [A]
time = 1.38, size = 9, normalized size = 0.39 \begin {gather*} \frac {3}{2} \, x^{2} - 2 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2+3*x)^2)^(1/2),x, algorithm="fricas")

[Out]

3/2*x^2 - 2*x

________________________________________________________________________________________

Sympy [A]
time = 0.01, size = 8, normalized size = 0.35 \begin {gather*} \frac {3 x^{2}}{2} - 2 x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2+3*x)**2)**(1/2),x)

[Out]

3*x**2/2 - 2*x

________________________________________________________________________________________

Giac [A]
time = 1.34, size = 26, normalized size = 1.13 \begin {gather*} \frac {1}{2} \, {\left (3 \, x^{2} - 4 \, x\right )} \mathrm {sgn}\left (3 \, x - 2\right ) + \frac {2}{3} \, \mathrm {sgn}\left (3 \, x - 2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2+3*x)^2)^(1/2),x, algorithm="giac")

[Out]

1/2*(3*x^2 - 4*x)*sgn(3*x - 2) + 2/3*sgn(3*x - 2)

________________________________________________________________________________________

Mupad [B]
time = 0.11, size = 13, normalized size = 0.57 \begin {gather*} \frac {\left |3\,x-2\right |\,\left (3\,x-2\right )}{6} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((3*x - 2)^2)^(1/2),x)

[Out]

(abs(3*x - 2)*(3*x - 2))/6

________________________________________________________________________________________